<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button on-touch="goback()" class="button return-btn">返回</button>
    <h1 class="title" ng-click="backToTop()">发布约局</h1>
    <button ng-click="releaseMeeting()" class="button hd-red-btn">发布</button>
  </ion-header-bar>
  <ion-content class="gray-bg" has-bouncing="true">
    <div class="list release-list">
      <div class="item release-tips" ng-bind="topTip">私密约局：只有@到的用户才受到邀约，才可以报名参加。</div>
    </div>
    <div class="list release-list">
      <div class="item release-item-li" ng-click="selectMmType()">
        <em class="release-item-tit">类型</em>
            <span class="release-item-right">
                <a class="release-item-href">{{meeting.mm_type}}<i class="release-item-icon"></i></a>
            </span>
      </div>
    </div>
    <div class="list release-list">
      <div class="item release-item-li">
        <em class="release-item-tit">封面</em></div>
      <div class="item row row-wrap release-item-li">
        <div class="col-33">
          <div class="release-upload-item">
            <div class="release-upload-pop-bg" ng-if="!mm_cover_url&&!edit_cover_url">
              <i class="release-upload-pop-icon"></i>
              <em class="release-upload-pop-txt">默认封面</em>
            </div>
            <img ng-src="{{picPath}}test.jpg" class="change_img" onload="handleImg(80,80)" ng-if="!mm_cover_url&&!edit_cover_url" alt=""/>
            <img ng-src="{{mm_cover_url}}" class="change_img" onload="handleImg(80,80)" ng-if="mm_cover_url&&!edit_cover_url" alt=""/>
            <img ng-src="{{picPath}}{{update_mm_cover_url}}" class="change_img" onload="handleImg(80,80)" ng-if="edit_cover_url" alt=""/>
          </div>
        </div>
        <div class="col-33">
          <div class="release-upload-item">
            <a ng-click="selectMeetingCover()" class="release-upload-add-a">
              <i class="release-upload-add-icon"></i>
              <em class="release-upload-add-txt">自定义</em>
            </a>
          </div>
        </div>
      </div>
    </div>
    <div class="list release-list">
      <div class="item item-input my-data-item">
        <span class="input-label release-item-tit">主题：</span>
        <input type="text" ng-model="meeting.mm_title" placeholder="请填写活动主题名称">
      </div>
      <div ng-click="go2MeetingDesc()" class="item release-item-li">
        <em class="release-item-tit">描述：</em>
            <span class="release-item-right">
                <span class="release-item-href"><i class="release-item-icon"></i></span>
            </span>
      </div>
      <!--ng-click="selectMeetingTime()"-->
      <div id="selectMmTime" ng-click="selectMeetingTime()" class="item release-item-li">
        <em class="release-item-tit">日期：</em>
             <span class="release-item-right">
                <a class="release-item-href">{{meeting.mm_time|date:'yyyy-MM-dd HH:mm'}}<i class="release-item-icon"></i></a>
            </span>
      </div>
      <div ng-click="selectMmAddr()" class="item release-item-li">
        <em class="release-item-tit">地点：</em>
            <span class="release-item-right">
                <a class="release-item-href">{{meeting.mm_address|limitTo:18}}<span ng-if="meeting.mm_address.length>18">...</span><i class="release-item-icon"></i></a>
            </span>
      </div>
    </div>
    <div class="list release-list">
      <div class="item release-item-li" ng-click="selectMmPayType()">
        <em class="release-item-tit">买单：</em>
            <span class="release-item-right">
                <a class="release-item-href">{{meeting.mm_pay_type}}<i class="release-item-icon"></i></a>
            </span>
      </div>
      <div class="item release-item-li" ng-click="selectWine()">
        <em class="release-item-tit">具体酒款（选填）：</em>
            <span class="release-item-right">
                <a class="release-item-href">{{wineSelectedInfo}}<i class="release-item-icon"></i></a>
            </span>
      </div>
    </div>
      <div class="list release-list">
        <div class="item item-input my-data-item">
          <span class="input-label release-item-tit">限定人数：</span>
          <input type="text" ng-model="meeting.mm_attend_num" placeholder="请输入限定人数">
        </div>
        <!--公开约，限定对象-->
        <div class="item release-item-li" ng-click="selectMmAttendType()" ng-if="meeting.mm_type=='公开约'">
          <em class="release-item-tit">限定对象：</em>
            <span class="release-item-right">
                <a class="release-item-href">{{meeting.mm_attend_type}}<i class="release-item-icon"></i></a>
            </span>
        </div>
          <!--受邀对象-->
          <div ui-sref="invite-user-list" class="item release-item-li" ng-if="meeting.mm_type=='私密约'">
              <em class="release-item-tit">受邀对象：</em>
              <span class="release-item-right">
                <a class="release-item-href"><i class="release-item-icon"></i></a>
              </span>
          </div>
          <!--受邀对象显示-->
          <div class="item release-item-li" ng-if="meeting.mm_type=='私密约'&& attend_member.length>0">
                <a class="mr10" ng-repeat="member in attend_member |limitTo:6">@{{member.member_name}}&nbsp;</a>
          </div>
        <!--</div>-->
      </div>
      <div class="list release-list">
        <div class="item release-tips" style="margin-top:-10px">
          温馨提示：先建立微信群，便于活动前后期联系哦。您可以添加微信账号 winelife1 和 AussinoWW 建立活动微信群。成功报名的酒友将会看到这个微信群二维码哦。如何找到群二维码？→点击微信群右上方→点击“群二维码”→截图保存。
        </div>
      </div>

      <div class="list release-list">
        <div class="item release-item-li">
          <em class="release-item-tit">微信二维码：</em>

          <div class="release-upload-code">
            <a ng-click="selectMeetingGroupcode()" ng-class="{'release-upload-code-box':!mm_groupcode_url&&!edit_groupcode_url}">
              <div class="release-upload-item" ng-if="mm_groupcode_url||edit_groupcode_url">
                <img ng-if="!edit_groupcode_url&&mm_groupcode_url" ng-src="{{mm_groupcode_url}}" style="overflow:hidden" class="change_img" onload="handleImg(80,80)" alt=""/>
                <img ng-if="edit_groupcode_url" class="change_img" onload="handleImg(80,80)" style="overflow:hidden" ng-src="{{picPath}}{{update_mm_groupcode_url}}" alt=""/>
              </div>
              <i class="release-upload-code-icon" ng-if="!mm_groupcode_url&&!update_mm_groupcode_url"></i>
            </a>
            <em class="release-upload-add-txt">添加微信二维码图片</em>
          </div>
        </div>
      </div>
  </ion-content>
</ion-view>
